package com.xxx.feignclient;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author blijojo
 * @date 2021/5/24
 */
@FeignClient(value = "HYSTRIX", fallback = HystrixClientFallBack.class)
public interface HystrixClient {
    /**
     * 测试服务降级后返回实现类{@link HystrixClientFallBack}中指定的默认方法
     *
     * @param id id
     * @return String
     */
    @GetMapping("/hystrix/break")
    String testBreak(@RequestParam("id") int id);

}
